package com.hyz.testsdcardhtml;

import android.app.Application;
import android.os.Environment;
import android.util.Log;

import java.util.ArrayList;
import java.util.List;

public class App extends Application {
    public static final String PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/art/";


    public static final String ROOT_FONT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/art/fonts";
    public static final String DEFAULT_FONT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/art/fonts/default.ttf";
    public static final String SON_FONT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/art/fonts/simson.ttf";
    public static final String KAI_FONT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/art/fonts/simkai.ttf";
    public static final String YOU_FONT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/art/fonts/simyou.ttf";
    public static final String YZQS_FONT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/art/fonts/yzqs.ttf";

    @Override
    public void onCreate() {
        super.onCreate();
        try{
            TypefaceUtil.replaceSystemDefaultFont(this,DEFAULT_FONT_PATH);
        }catch (Exception e){
            Log.e("APP","变更字体失败，将使用默认字体");
            Log.e("APP",e.getMessage());
        }

    }
}
